/**
 *  常量路由，登录及异常页面：
 *
 */
import type { RouteRecordRaw } from "vue-router";

// 错误路径重定向404
export const mistakeRoute: RouteRecordRaw = {
  path: "/:pathMatch(.*)*",
  redirect: "/404",
};

// 登录路由
export const loginRoute: RouteRecordRaw = {
  path: "/login",
  name: "login",
  meta: {
    title: "登录页面",
  },
  component: () => import("@/views/login/index.vue"),
};

// 404路由
export const notFoundRoute: RouteRecordRaw = {
  path: "/404",
  meta: {
    title: "错误页面",
  },
  component: () => import("@/layout/index.vue"),
  children: [
    {
      path: "",
      name: "Mistake",
      component: () => import("@/views/not-found/index.vue"),
    },
  ],
};
